
<!-- README.md is generated from README.Rmd. Please edit that file -->

# Anthromes-12k Discrete Global Grid (V1) Research Compendium

This repository contains the code for our paper:

> Ellis, E.C., N. Gauthier, K. Klein Goldewijk, R. Bliege Bird, N. Boivin, S. Diaz, D. Fuller, J. Gill, J. Kaplan, N. Kingston, H. Locke, C. McMichael, D. Ranco, T. Rick, M.R. Shaw, L. Stephens, J.C. Svenning, J.E.M. Watson, (2021). *People have shaped most of terrestrial nature for at least 12,000 years*. PNAS.
> <https://doi.org/10.1073/pnas.2023483118>

Data required for these analyses is available online here:

> Gauthier, N., Ellis, E.C., K. Klein Goldewijk, (2021), *Anthromes 12k DGG Input Data*. Online at Harvard Dataverse,
> <https://doi.org/10.7910/DVN/JWEEAH>

This code is sufficient to reproduce all analyses and figures presented in the main text and supplement (excluding maps).
Please see the *anthromes* R package available at <https://github.com/nick-gauthier/anthromes> for a more up-to-date version of this codebase including additional features, performance improvements,
and documentation.

### How to cite

Please cite this compendium as:

> Gauthier, Nicolas (2021). *Anthromes 12K DGG (V1) analysis code and R research compendium*. Online at Harvard Dataverse, 
> <https://doi.org/10.7910/DVN/6FWPZ9>

## Contents

The **analysis** directory contains:

  - [:file\_folder: analysis](/analysis/): R Markdown source document
    for manuscript. Includes code to reproduce the figures and tables
    generated by the analysis. It also has a rendered version,
    `analysis.pdf`, suitable for reading.
  - [:file\_folder: figures](/analysis/figures): Plots and other
    illustrations.
  - [:file\_folder:data](/analysis/data): An empty folder which the 
  analysis.rmd script will expect to find the necessary input data. Add data from
  the above linked input data repository to this folder if you wish to rerun the 
  analysis from scratch.

## How to download and run locally

This research compendium has been developed using the statistical
programming language R. To work with the compendium, you will need
installed on your computer the [R
software](https://cloud.r-project.org/) itself and optionally [RStudio
Desktop](https://rstudio.com/products/rstudio/download/).

You can download the compendium as a zip from from this URL:
[master.zip](/archive/master.zip). After unzipping: 

  - open the `.Rproj` file in RStudio 
  - open `analysis/analysis.Rmd` and knit to produce the `analysis.pdf`, or run
`rmarkdown::render("analysis/analysis.Rmd")` in the R console. All required R
packages are listed in the relevant .Rmd document.
  - open `analysis/DGG_preparation.Rmd` and `analysis/anthromes_classification.Rmd`
  for details of the DGG regridding workflow and anthromes classificaiton routine,
  respecitively.

### Licenses

**Text and figures :**
[CC-BY-4.0](http://creativecommons.org/licenses/by/4.0/)

**Code :** See the [DESCRIPTION](DESCRIPTION) file

**Data :** [CC-0](http://creativecommons.org/publicdomain/zero/1.0/)
attribution requested in reuse

### Contributions

We welcome contributions from everyone. Before you get started, please
see our [contributor guidelines](CONTRIBUTING.md). Please note that this
project is released with a [Contributor Code of Conduct](CONDUCT.md). By
participating in this project you agree to abide by its terms.
